package alinesno.cloud.busines.demo.gateway.dto;


import com.alinesno.cloud.common.facade.dto.BaseDto;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * 功能名： 班级
 * 数据表：  course_college
 * @author wh ${authorEmail}
 * @date 2021-09-06 22:52:32
 */
public class CourseCollegeDto extends BaseDto {
    private static final long serialVersionUID = 1L;
    // fields
        /**
         *  "courseNumber"
         */
        private String courseNumber;
        /**
         *  "courseName"
         */
        private String courseName;
        /**
         *  "courseYear"
         */
        private Long courseYear;
        /**
         *  "collegeId"
         */
        private String collegeId;
        /**
         *  "courseDegree"
         */
        private String courseDegree;
    //getter and setter
        public String getCourseNumber()

        {
            return this.courseNumber;
        }

        public CourseCollegeDto setCourseNumber(String arg) {
            this.courseNumber = arg;
            return this;
        }
        public String getCourseName()

        {
            return this.courseName;
        }

        public CourseCollegeDto setCourseName(String arg) {
            this.courseName = arg;
            return this;
        }
        public Long getCourseYear()

        {
            return this.courseYear;
        }

        public CourseCollegeDto setCourseYear(Long arg) {
            this.courseYear = arg;
            return this;
        }
        public String getCollegeId()

        {
            return this.collegeId;
        }

        public CourseCollegeDto setCollegeId(String arg) {
            this.collegeId = arg;
            return this;
        }
        public String getCourseDegree()

        {
            return this.courseDegree;
        }

        public CourseCollegeDto setCourseDegree(String arg) {
            this.courseDegree = arg;
            return this;
        }

    /**
    * 快速从 dto 转换成 entity
    * @return  dto 对应的 entity
    */
    public CourseCollegeDto mapToDto() {
        ObjectMapper toDtoMapper = new ObjectMapper();
        toDtoMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        return toDtoMapper.convertValue(this,CourseCollegeDto.class);
    }

    /**
    * 快速从 entity 转换成 dto
    * @return  dto 对应的 entity
    */
    public CourseCollegeDto fromDto(CourseCollegeDto entity) {
        ObjectMapper fromDtoMapper = new ObjectMapper();
        fromDtoMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        return fromDtoMapper.convertValue(entity,CourseCollegeDto.class);
    }

}
